package com.neo.controller;

import com.alibaba.fastjson.JSON;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
public class HelloController {

    @RequestMapping("/")
    public String indexHello(HttpServletRequest request) {
        System.out.println("hello!");
        Object redisTest = request.getSession().getAttribute("redisTest");
        System.out.println(JSON.toJSONString(redisTest));
        request.getSession().setAttribute("redisTest", "8085");
        return "Hello I'm nginx转发了!";
    }
}